<div>
	<div class="panel panel-primary text-center">
		<div class="panel-heading">
			<span class="main-title"><span class="glyphicon glyphicon-search"></span> {{'policySearch' | translate}}</span>
		</div>
	</div>
	<div message-error-panel ng-model="message"></div>
	<div class="panel panel-info">
		<div class="panel-heading">{{'parameters' | translate}}</div>
		<div class="panel-body">
			<form name="form" class="form-horizontal" ng-init="policySearchAction={}">
				<div class="form-group">
					<label class="col-sm-2 control-label">{{'type' | translate}}</label>
					<div class="col-sm-10">
						<label class="radio-inline"><input type="radio" ng-click = "searchType='searchById'" ng-model="searchType" value="searchById">{{'searchById' | translate}}</label> 
						<label class="radio-inline"><input type="radio" ng-click = "searchType='searchByName'" ng-model="searchType" value="searchByName">{{'searchByName' | translate}}</label> 
						<label class="radio-inline"><input type="radio" ng-click = "searchType='searchByCertificate'" ng-model="searchType" value="searchByCertificate">{{'searchByCertificate' | translate}}</label>
					</div>
				</div>
				<div class="procedure-details" ng-show = "searchType == 'searchById'">
					<div class="form-group">
						<label class="col-sm-2 control-label" translate="Person.idCardNumber"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.idCard" type="text" class="form-control" ng-model="policySearchAction.idCard">
			    		</div>
			    	</div>
	         	</div>
		        <div class="procedure-details" ng-show = "searchType == 'searchByName'">
					<div class="form-group">
						<label class="col-sm-2 control-label" translate="Person.name"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.name" type="text" class="form-control" ng-model="policySearchAction.name">
			    		</div>
						<label class="col-sm-2 control-label" translate="Person.surname"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.surname" type="text" class="form-control" ng-model="policySearchAction.surname">
			    		</div>
			    	</div>
		        </div>
		        <div class="procedure-details" ng-show = "searchType == 'searchByCertificate'">
					<div class="form-group">
						<label class="col-sm-2 control-label" translate="agreement"></label>
						<div class="col-sm-3">
							<select class="form-control" ng-model="policySearchAction.agreement">
								<option ng-repeat="agreement in agreements" value="{{agreement.code}}">{{agreement.code}} - {{agreement.name}}</option>
								<option></option>
							</select>
			    		</div>
						<label class="col-sm-2 control-label" translate="colective"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.colectiva" type="text" class="form-control" ng-model="policySearchAction.colectiva">
			    		</div>
			    	</div>
					<div class="form-group">
						<label class="col-sm-2 control-label" translate="office"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.filial" type="text" class="form-control" ng-model="policySearchAction.filial">
			    		</div>
						<label class="col-sm-2 control-label" translate="certificate"></label>
						<div class="col-sm-3">
			      			<input name="policySearchAction.number" type="text" class="form-control" ng-model="policySearchAction.number">
			    		</div>
			    	</div>
		        </div>
			</form>
			<div class="center top-10">
				<button class="btn btn-primary" ng-click="search()" ng-disabled="isLoading"><span ng-class="{'glyphicon glyphicon-refresh spin' : isLoading}"></span> {{(isLoading ? 'searching' : 'search') | translate}}</button>
				<button class="btn btn-warning" ng-click="clear()">{{'clear' | translate}}</button>
			</div>
		</div>
	</div>
	<div search-policy-list ng-model="hostSearchResults" title="{{'hostPolicies' | translate}}"></div>
	<div search-policy-list ng-model="poleSearchResults" title="{{'polePolicies' | translate}}"></div>
</div>